import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import {LoginPage} from "../login/login";
import { AppVersion } from '@ionic-native/app-version';
import { Platform } from 'ionic-angular';
@Component({
  selector: 'page-about',
  templateUrl: 'account.html'
})
export class AccountPage {
private appName: string;
private packageName: string;
private versionCode: string;
private versionNumber: string;
  constructor(public plt: Platform,public navCtrl: NavController,private appVersion: AppVersion) {
navCtrl.push(LoginPage);
    this.plt.ready().then((readySource) => {
      console.log('Platform ready from', readySource);
      if(readySource=="cordova"){
      // Platform now ready, execute any required native code
    appVersion.getAppName().then(appName=>this.appName=appName);
    appVersion.getPackageName().then(packageName=>this.packageName=packageName);
    appVersion.getVersionCode().then(versionCode=>this.versionCode=versionCode);
    appVersion.getVersionNumber().then(versionNumber=>this.versionNumber=versionNumber);
      }
    });
  }
}
